Goal-Directed Equation Solving

نویسندگان

  • Nachum Dershowitz
  • G. Sivakumar
چکیده

Solving equations in equational Horn-clause theories is a programming paradigm that combines logic programming and functional programming in a clean manner. Languages like E&LOG, SLOG and RITE, express programs as rewrite rules and use narrowing to solve goals expressed as equations. In this paper, we express equational goal solving by means of a logic program that simulates rewriting of terms. Our goal-directed equation solving procedure is based on “directed goals”, and combines narrowing with a more top-down approach. We also show how to incorporate a notion of operator derivability to prune some useless paths, while maintaining completeness of the method. I. Equational Programming Several proposed programming languages use (conditional) equations as a means of combining the main features of logic programming and functional programming; such languages include RITE [Dershowitz and Plaisted, 19851, SLOG [Fribourg, 19851, and EQLOG [Goguen and Meseguer, 19861. Computing consists of finding values (substitutions) for the variables in a goal s=t for which the equality holds. Efficient methods of solving equations are therefore very important, as is the ability to detect when an equation is unsatisfiable. In this paper, we concentrate on programs composed of unconditional rules though the ideas extend to conditional rules, as employed in the above languages. Solving equational goals and detecting unsatisfiability are also important for theorem-proving procedures (e.g. . [Kaplan-881) based on conditional equations. Consider the following example of a system for reversing a list used in [Ullman and Van Gelder, 19851 to illustrate their scheme of top-down capture rules, where rev is reverse and tcons adds an element to the end of a list. (We use capital letters for variables in rules and terms.) * This research was supported in Foundation under Grant DCR 85-13417. 166 Automated Reasoning part by the National rev(ni1) 4 nil rev(A l X) -+ tcons(rev(X),A) tcons (nil&) 3 A *na’! tcon8 (.&x,A j --+ B.tcons (X,A) 1 A goal of the form X=Pev(1*2.&) can be solved by rewriting the right-hand side of the goal to yield X=2al*nil; rewriting corresponds to the functional part of equational programming. On the other hand, a query like rev (X)=1-2 *nil, requires equation solving t.o produce the value(s) for X that satisfies the equation. This query has the answer, {Xt-+2*1*nil}. Finding solutions corresponds to the logic programming capability. Solving equations is, therefore, a basic operation in interpreters for such equational languages and efficient methods are of critical importance. in general, paramodulation can be used (as in resolution-based theorem provers to solve equations, but is highly inefficient. For equational theories that can be presented as a (ground) confluent rewrite system, better equation-solving methods have been devised, narrowing [Slagle-74, Fay79, Hullot-801 being the most popular. Techniques for helping make a narrowing procedure efficient are given in [Josephson-Dershowitz-861. An alternative approach to equation solving, based on decomposition and restructuring has been suggested in [Martelli,etal.-861. We will refer to the latter as the decomposition procedure. In this paper, we combine the above two approaches in a goal-directed procedure. When an equation is unsatisfiable, none of these procedures are guaranteed to halt. Indeed, this is inherent to the semi-decidabiiity of the (equational) satisfiability problem. Still, the ability to detect some unsatisfiable subgoals can save a lot of unnecessary computation. We describe the narrowing and decomposition procedures in Section 2. Our new, goal-directed procedure is formulated as a Prolog program in Section 3; it captures the advantages of both narrowing and decomposition and incorporates pruning of certain unsatisfiable goals. From: AAAI-88 Proceedings. Copyright ©1988, AAAI (www.aaai.org). All rights reserved.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Solving Goals in Equational Languages

Solving equations in equational Horn-clause theories is a programming paradigm that combines logic programming and functional programming in a clean manner. Languages like EQLOG, SLOG and RITE, express programs as conditional rewrite rules and goals as equations to be solved. Procedures for completion of conditional equational theories, in a manner akin to that of Knuth and Bendix for unconditi...

متن کامل

Equation Solving in Conditional AC-Theories

Conditional Equational Programming is an elegant way to uniformly integrate important features of functional and logic programming. Efficient methods for equation solving are thus of great importance. In this paper, we formulate, and prove sound and complete, an equation solving procedure based on transformation rules. This method achieves a top-down, goal-directed strategy based on decompositi...

متن کامل

Solving future problems: Default network and executive activity associated with goal-directed mental simulations

Mental simulations are often focused on a goal in the future or a problem to be solved. Recent neuroimaging studies have associated mental simulations of the future with default network activity, but the simulations in these studies were not typically directed toward achieving a particular goal. Goal-directed simulation requires cognitive control to maintain information, make decisions, and coo...

متن کامل

Problem Structure And Problem Solving Behavior

One of the most interesting questions in the study of human problem solving is the nature of the Interaction between a problem's intrinsic structure and a problem solver's strategies or behaviors. The present paper suggests the use of techniques developed in research in mechanical problem solving to assist in formulating and illuminating this question. The authors also seek to develop a relatio...

متن کامل

The role of cognitive learning methods, problem solving methods and self-directed learning with critical thinking students'

The purpose of the present study was to the role of cognitive learning methods, problem solving methods and self-directed learning with critical thinking students. The research method was descriptive correlational. The statistical population of this study was male secondary school students in Tabriz, in the academic year of 2018-2019. According to the Education Office, there are 3224 people in ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1988